<template>
  <transition name="fade">
    <div class="c-page-header" v-if="show">
      <h1 class="c-page-header--title">{{ title }}</h1>
      <p class="c-page-header--subtitle">{{ subtitle }}</p>
    </div>
  </transition>
</template>

<script>
  export default {
    props: {
      title: {
        type: String,
        default: 'Title'
      },
      subtitle: {
        type: String,
        default: 'SubTitle'
      }
    },
    data() {
      return {
        show: false
      }
    },
    mounted() {
      this.show = true
    }
  }
</script>

<style lang="scss" scoped>
  .c-page-header {
    padding: 0 0 40px 32px;
  }
  .c-page-header--title {
    font-size: 70px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
  }
  .c-page-header--subtitle {
    font-size: 21px;
    font-family: ClanPro;
    color: #fff;
  }

  .fade-enter-active {
    opacity: 1;
    // transform: translate3d(0, 0, 0);
    transition: all 2s;
  }
  .fade-enter {
    opacity: 0;
    // transform: translate3d(0, -30%, 0);
    transition: all 2s;
  }
  .fade-leave {
    opacity: 1;
    transition: all 2s;
  }
  .fade-leave-active {
    opacity: 0;
    transition: all 2s;
  }
</style>
